﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Client
{
    public partial class ClientForm : Form
    {
        string name;
        public ClientForm(string s)
        {
            InitializeComponent();
            name = s;
        }

        private void ClientForm_Load(object sender, EventArgs e)
        {
            //ClientForm.ActiveForm.Text = "Clinet : " + name;
            label1.Text = "Hi dear " + name + " !";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "All files (*.*) |*.*";
            openFileDialog1.FilterIndex = 1;
            openFileDialog1.Title = "جستجوی فایل";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {

                textBox1.Text = openFileDialog1.FileName;

                //textBox1.Text = filename;
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            openFileDialog2.Filter = "torrent files (*.torrent) |*.*";
            openFileDialog2.FilterIndex = 1;
            openFileDialog2.Title = "جستجوی فایل";
            if (openFileDialog2.ShowDialog() == DialogResult.OK)
            {

                textBox2.Text = openFileDialog2.FileName;

                //textBox1.Text = filename;
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}
